package fm.last.api
{
    import fm.last.BaseTC;
    

    public class PlaylistAPITest extends BaseTC
    {
        
        
        public function PlaylistAPITest()
        {
            super();
            
            addTest("testFetch");         
            addTest("testAddTrack");
            
            // open it if you want to test            
            //addTest("testCreate");
            
                      
        }
     
        public function testAddTrack():void
        {     
            // duplicatelyadding a track -> error
            var f:Function = function(ignored:*):void {
                lfm_service.playlist.addTrack(unexpectedComplete, expectedError, "4925239", "Björk", "Isobel");
            };
            lfm_service.playlist.addTrack(f, f, "4925239", "Björk", "Isobel");        
        }
        
        public function testCreate():void
        {
            lfm_service.playlist.create(expectedPattern("/lfm/playlists/playlist/id"), unexpectedError, "test_list", "test list");            
        }
        
        public function testFetch():void
        {      
            lfm_service.playlist.fetch(expectedPattern("/lfm"), unexpectedError, "lastfm://playlist/album/2026126");      
        } 
                   
    }
}